laravel where doesnt have

53

laravel where doesn't have -

// get all Videos that don't belong to category 2 and 3
Video::whereDoesntHave('categories', function($query) {
  $query->whereIn('id', [2, 3]);
})->get();

Comments

Submit
0 Comments